package com.estate.system.domain.vo;

import com.estate.system.domain.report.boss.agentperformance.AgentClientCount;
import com.estate.system.domain.report.boss.agentperformance.AgentRecommendationRate;
import com.estate.system.domain.report.boss.agentperformance.AgentStats;
import com.estate.system.domain.report.boss.agentperformance.ChartData;

import java.util.ArrayList;
import java.util.List;

public class AgentPropertyAndTransactionRelation  {
    public static ChartData createPropertyType() {
        ChartData chartData = new ChartData();

        // 创建代理人Amy Hu的数据
        AgentStats amyHu = new AgentStats("Amy Hu");
        amyHu.addPropertyType("Apartment", 8);
        amyHu.addPropertyType("Bungalow", 3);
        amyHu.addPropertyType("Condo", 5);
        amyHu.addPropertyType("Townhouse", 2);

        // 创建其他代理人数据
        AgentStats johnDoe = new AgentStats("John Doe");
        johnDoe.addPropertyType("Apartment", 12);
        johnDoe.addPropertyType("Bungalow", 2);
        johnDoe.addPropertyType("Condo", 3);
        johnDoe.addPropertyType("Townhouse", 4);

        AgentStats janeSmith = new AgentStats("Jane Smith");
        janeSmith.addPropertyType("Apartment", 5);
        janeSmith.addPropertyType("Bungalow", 7);
        janeSmith.addPropertyType("Condo", 2);
        janeSmith.addPropertyType("Townhouse", 3);

        // 添加到主数据
        chartData.addAgentStats(amyHu);
        chartData.addAgentStats(johnDoe);
        chartData.addAgentStats(janeSmith);
        return chartData;
    }
    public static ChartData createTransactionType() {
        ChartData chartData = new ChartData();
        
        // 创建代理人Amy Hu的数据
        AgentStats amyHu = new AgentStats("Amy Hu");
        amyHu.addTransactionType("Lease", 6);
        amyHu.addTransactionType("Private Sale", 4);
        amyHu.addTransactionType("Auction", 1);
        
        // 创建其他代理人数据
        AgentStats johnDoe = new AgentStats("John Doe");
        johnDoe.addTransactionType("Lease", 8);
        johnDoe.addTransactionType("Private Sale", 6);
        johnDoe.addTransactionType("Auction", 2);
        
        AgentStats janeSmith = new AgentStats("Jane Smith");
        janeSmith.addTransactionType("Lease", 4);
        janeSmith.addTransactionType("Private Sale", 8);
        janeSmith.addTransactionType("Auction", 1);
        
        // 添加到主数据
        chartData.addAgentStats(amyHu);
        chartData.addAgentStats(johnDoe);
        chartData.addAgentStats(janeSmith);
        
        return chartData;
    }
    public static List<AgentClientCount> createTopAgentsByClientCount() {
        List<AgentClientCount> agentClientCountList = new ArrayList<>();

        // 添加客户数量最多的代理人数据
        agentClientCountList.add(new AgentClientCount("Daniel Yu", 21));
        agentClientCountList.add(new AgentClientCount("Amy Hu", 16));
        agentClientCountList.add(new AgentClientCount("Jenny Zhang", 8));
        agentClientCountList.add(new AgentClientCount("Cathy Yuan Tan", 6));
        agentClientCountList.add(new AgentClientCount("Ken Zhenavana Li", 5));
        return agentClientCountList;
    }
    public static  List<AgentRecommendationRate> createAgentRecommendationRate() {
        List<AgentRecommendationRate> agentRecommendationRateList = new ArrayList<>();
        // 添加代理人推荐率数据
        agentRecommendationRateList.add(new AgentRecommendationRate("Ken Zhengyang Li", 1.0));
        agentRecommendationRateList.add(new AgentRecommendationRate("Daniel Hongxin Zhou", 1.0));
        agentRecommendationRateList.add(new AgentRecommendationRate("Callista Lau", 1.0));
        agentRecommendationRateList.add(new AgentRecommendationRate("Lisa Villa Vasilevski", 1.0));
        agentRecommendationRateList.add(new AgentRecommendationRate("Daniel Yu", 0.905));

        return agentRecommendationRateList;
    }
}